using System;
using System.Net.Mail;
using System.Text;

/// <summary>
/// Summary description for SMTPResponse
/// </summary>

namespace PopMail
{
    public class SMTPResponse
    {
        private MailMessage m_message;
       
        //Constructor for default auto response

        public SMTPResponse(MailMessage message)
        {
            this.m_message = message;
        }

        public SMTPResponse(string emailTo)
        {
            m_message = new MailMessage();
            m_message.To.Add(emailTo); 
            m_message.Subject = POP3Constants.M_AUTO_RESPONSE_SUBJECT;
            m_message.IsBodyHtml = true;
            m_message.BodyEncoding = Encoding.ASCII;
            m_message.Body = "";// Global.applicationParameters.Get("AutoResponseMessage");
        }

        public bool SendMessage()
        {
            bool status = true;
            SmtpClient sc = new SmtpClient();

            try
            {
              //  sc.Send(m_message);
            }
            catch (Exception ex)
            {
                ex.ToString();
                status = false;
            }

            sc = null;            
            return status;
        }

    }
}